/**
 * user
 * @param  {[type]} sequelize [description]
 * @param  {[type]} DataTypes [description]
 * @return model
 */
export default (sequelize, DataTypes) => sequelize.define('factory', {
  id: {
    type: DataTypes.UUID,
    primaryKey: true
  },
  user_id: {
    type: DataTypes.UUID,
    references: {
      model: 'users',
      key: 'id'
    }
  },
  name: DataTypes.STRING(100),
  create_time:  DataTypes.STRING(20),
  legal_person: DataTypes.STRING(50),
  registered_capital: DataTypes.BIGINT(15),
  business_code: DataTypes.STRING(20),
  main_business: DataTypes.INTEGER(2),
  type: DataTypes.INTEGER(2),
  desc: DataTypes.STRING(300)
})
